<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <video id="video" src="./main_bg.mp4" autoplay="true" preload="auto" loop="true" muted="false"></video>
    <button id="sound">dlajd </button>
    <script>
        var myvid = document.getElementById('video');
        var sound = document.getElementById('sound');
        sound.onclick=function(){
            console.log('2222');
            var sta = myvid.muted;
            if(sta == true){
                myvid.muted = false
            }else{
                myvid.muted = true
            }
        }
        // myvid.onmouseover = function(){
        //     console.log('22222')
        //         myvid.muted = true
        // //     }
        // }
        // setTimeout(function(){
        //     myvid.muted = false
        //     // setTimeout(function(){
        //     //  myvid.muted = true
        //     // },2000)
        // },1000)
    </script>
</body>
</html>